package com.wondertek.common.exception;

import cn.hutool.http.HttpStatus;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author xqs
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class AccessDeniedException extends RuntimeException{

    private Integer code;

    private String message;

    public AccessDeniedException(Integer code) {
        this.code = code;
    }


    public AccessDeniedException(String message) {
        super(message);
        this.code = HttpStatus.HTTP_FORBIDDEN;
        this.message = message;
    }

}
